package com.whty.Demo03;

import com.sun.org.apache.bcel.internal.generic.NEW;
import com.whty.Demo02.UseConfAnnotationService;
import com.whty.MyComponents.ControllerPojo;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.sound.midi.Soundbank;

/**
 * Copyright 2016-2022 tianyu education Corporation, All Rights Reserved
 * http://www.whty.com.cn/
 *
 * @author wangming
 * @version 1.0
 * @date 2020/9/8 11:40
 * @since 1.0
 */


public class MoreConfAnnotationMain {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(MoreConfAnnotationConfiguration.class);
       /* ConfigurableListableBeanFactory factory = ac.getBeanFactory();
        String[] beanDefinitionNames = factory.getBeanDefinitionNames();
        for(String s:beanDefinitionNames){
            System.out.println(s);
        }*/
        System.out.println(ac.getBean(ControllerPojo.class));
        System.out.println(ac.getBean(UseConfAnnotationService.class));
        System.out.println(ac.getBean(MoreConfAnnotationService.class));

    }

}
